

from string import ascii_letters
print(ascii_letters)


ctoi = lambda x: ascii_letters.index(x)
itoc = lambda x: ascii_letters[x]
flag="flag"
key = flag.strip('NCTF{}')
len_key = len(key)
plaintext="abcdef"
plain = ''.join(p for p in plaintext if p in ascii_letters)
print(plain)
cipher = ''.join( itoc( ( ctoi(p) + ctoi( key[i % len_key] ) ) % 52 )  for i,p in enumerate(plain) )

c = ''
for i, p in enumerate(plain):
    print(i, p)


print(cipher)